from nextpy_org import styles
from nextpy_org.templates import template
import nextpy as xt

@template(route="Alert", title="4Components", description="8")
def alert() -> xt.Component:
    relative_path = 'nextpy_org/mdfiles/components/feedback/alert.md'
    with open(relative_path, encoding="utf-8") as readme:
        content = readme.read()
    return xt.markdown(content, component_map=styles.markdown_style)

@template(route="CircukarProgress", title="4Components", description="8")
def circularprogress() -> xt.Component:
    relative_path = 'nextpy_org/mdfiles/components/feedback/circularprogress.md'
    with open(relative_path, encoding="utf-8") as readme:
        content = readme.read()
    return xt.markdown(content, component_map=styles.markdown_style)

@template(route="Progress", title="4Components", description="8")
def progress() -> xt.Component:
    relative_path = 'nextpy_org/mdfiles/components/feedback/progress.md'
    with open(relative_path, encoding="utf-8") as readme:
        content = readme.read()
    return xt.markdown(content, component_map=styles.markdown_style)

@template(route="Skeleton", title="4Components", description="8")
def skeleton() -> xt.Component:
    relative_path = 'nextpy_org/mdfiles/components/feedback/skeleton.md'
    with open(relative_path, encoding="utf-8") as readme:
        content = readme.read()
    return xt.markdown(content, component_map=styles.markdown_style)

@template(route="Spinner", title="4Components", description="8")
def spinner() -> xt.Component:
    relative_path = 'nextpy_org/mdfiles/components/feedback/spinner.md'
    with open(relative_path, encoding="utf-8") as readme:
        content = readme.read()
    return xt.markdown(content, component_map=styles.markdown_style)